home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Shareware / Programare / magiccd / mcdbc111t.exe / %MAINDIR% / C++ Builder / CPPB6.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-03-08  |  1.1 KB  |  40 lines

  1. //---------------------------------------------------------------------------
  2.  
  3. #include <vcl.h>
  4. #pragma hdrstop
  5. //---------------------------------------------------------------------------
  6. USEFORM("Unit1.cpp", Form1);
  7. //---------------------------------------------------------------------------
  8. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  9. {
  10.         try
  11.         {
  12.                  Application->Initialize();
  13.                  Application->CreateForm(__classid(TForm1), &Form1);
  14.                  Application->Run();
  15.         }
  16.         catch (Exception &exception)
  17.         {
  18.                  Application->ShowException(&exception);
  19.         }
  20.         catch (...)
  21.         {
  22.                  try
  23.                  {
  24.                          throw Exception("");
  25.                  }
  26.                  catch (Exception &exception)
  27.                  {
  28.                          Application->ShowException(&exception);
  29.                  }
  30.         }
  31.         return 0;
  32. }
  33. //---------------------------------------------------------------------------
  34.  
  35. main()
  36. {
  37.    WinMain(0, 0, 0, 0);
  38.  
  39. }
  40.